//
//  AllSiteInfo.m
//  EasyToo
//
//  Created by Jr Lan on 13-9-9.
//
//

#import "SiteTicketInfo.h"

@implementation SiteTicketInfo

- (id)initWithDictionary:(NSDictionary *)jsonDictionary
{
    self = [self init];
    if (self) {
        int advicePrice = GetDictionaryIntDefaultZero(jsonDictionary, @"advicePrice");
        int agentPrice = GetDictionaryIntDefaultZero(jsonDictionary, @"agentPrice");
        int commision = GetDictionaryIntDefaultZero(jsonDictionary, @"commision");
        int salePrice = GetDictionaryIntDefaultZero(jsonDictionary, @"salePrice");
        
        self.advicePrice = [NSString stringWithFormat:@"%d", advicePrice];
        self.agentPrice = [NSString stringWithFormat:@"%d", agentPrice];
        self.commision = [NSString stringWithFormat:@"%d", commision];
        self.currencyCode = GetDictionaryStringDefaultNil(jsonDictionary, @"currencyCode");
        self.endDate = GetDictionaryStringDefaultNil(jsonDictionary, @"endDate");
        self.payWay = GetDictionaryStringDefaultNil(jsonDictionary, @"payWay");
        self.remark = GetDictionaryStringDefaultNil(jsonDictionary, @"remark");
        self.salePrice = [NSString stringWithFormat:@"%d", salePrice];
        self.sceneId = GetDictionaryStringDefaultNil(jsonDictionary, @"sceneId");
        self.sceneTicketId = GetDictionaryStringDefaultNil(jsonDictionary, @"sceneTicketId");
        self.sceneTicketName = GetDictionaryStringDefaultNil(jsonDictionary, @"sceneTicketName");
        self.sceneTicketType = GetDictionaryStringDefaultNil(jsonDictionary, @"sceneTicketType");
        self.startDate = GetDictionaryStringDefaultNil(jsonDictionary, @"startDate");
        self.status = GetDictionaryStringDefaultNil(jsonDictionary, @"status");
        self.usefulLife = GetDictionaryStringDefaultNil(jsonDictionary, @"usefulLife");
    }
    return self;
}

@end
